﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess = Microsoft.MSE.Catalog.Module.Data;
using DTO = Microsoft.MSE.Catalog.Contracts;
using System.Xml;
using System.Data.SqlClient;
using System.Data;

namespace Microsoft.MSE.Catalog.Module.Business
{
    class EntityManager
    {
        public EntityManager()
        {

        }

        public static Guid GetIDFromName(string entityName, DTO.EntityClass entityClass, SqlTransaction txn, SqlConnection conn)
        {
            return DataAccess.Entity.GetIDFromName(entityName, entityClass, txn, conn);
        }

        public static DTO.Entity GetNameFromID(Guid entityID, SqlTransaction txn, SqlConnection conn)
        {
            return DataAccess.Entity.GetNameFromID(entityID, txn, conn);
        }

        public static DTO.EntityGroupList ListEntityGroupsByEntity(Guid entityID, SqlTransaction txn, SqlConnection conn)
        {
            return DataAccess.Entity.ListEntityGroupsByEntity(entityID, txn, conn);
        }

        public static DTO.EntityGroupList ListEntityGroups(Int16 entityTypeID, SqlTransaction txn, SqlConnection conn)
        {
            return DataAccess.Entity.ListEntityGroups(entityTypeID, txn, conn);
        }

        public static void DeleteEntityGroup(Guid ID, SqlTransaction txn, SqlConnection conn)
        {
            DataAccess.Entity.DeleteEntityGroup(ID, txn, conn);
        }

    }
}
